/*
 * @lc app=leetcode.cn id=492 lang=javascript
 *
 * [492] 构造矩形
 */

// @lc code=start
/**
 * @param {number} area
 * @return {number[]}
 */
var constructRectangle = function(area) {
    let arr = []
    for (let index = 1; index <= Math.ceil(area / 2); index++) {
        if (area % index === 0) {
            if (area / index < index) {
                break
            }
            arr.push([area / index, index])
        } 
    }
    return arr[arr.length - 1]
};
// @lc code=end

